package com.testMvc.testAop2;

import com.core.springaop.MyAopCache;
import com.core.springaop.MyAopFactory;
import com.core.springmvc.MyController;
import com.testMvc.testAop1.Inter1;
import com.testMvc.testAop1.inter1Impl;
import com.testMvc.GardenAction;

import java.lang.annotation.Annotation;

public class testAop2 {
    public static void main(String[] args) {
        test1();
    }

    public static void test1() {
        MyAopFactory.getInstance();

        System.out.println(MyAopCache.getProClass().size());
        Inter1 i =  MyAopFactory.getSub(inter1Impl.class);
        i.speak();
    }


    public static void test2() {
        Annotation[] as=GardenAction.class.getAnnotations();
        for (Annotation a:as){
            System.out.println(a.annotationType().equals(MyController.class));
        }
        System.out.println();
    }

}
